﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace AirlineBooking.Models.DTO
{
    public class DTORoute : IEnumerable<DTOAirport>
    {
        private List<DTOAirport> nodes = new List<DTOAirport>();

        public IEnumerator<DTOAirport> GetEnumerator()
        {
            return nodes.GetEnumerator();
        }

        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
            return nodes.GetEnumerator();
        }

        public  DTORoute(IEnumerable<DTOAirport> airports) {
            nodes.AddRange(airports);
        }
    }
}